1. Technical Field
The present invention relates in general to computer graphics systems and subsystems, and in particular to computer graphics subsystems having a double buffer display capability.
2. Description of the Related Art
In computer graphics, an image to be displayed is divided into a number of discrete picture elements or pixels. Each pixel represents a physical position on the output display monitor and can have associated with it a color or specific shade of gray. In image and graphics systems, the pixels of a display are each represented by a value stored in a memory device. This memory device storing this representation of a display is typically referred to as a frame buffer. A high resolution display, typically has an image of 1600.times.1280 or 2,048,000 pixels. Each pixel value can be represented by 1 to 32 or more bits, thus requiring a large amount of memory to store the image. This requirement for large amounts of high speed memory requires the use of high density memory devices, such as Dynamic Random Access Memories ("DRAMs").
The nature of video display scan patterns and update rates requires decoupling the updating of the frame buffer from the scanning out of the stored values (through video generation circuitry) for display on the video monitor. Consequently, a specialized form of DRAM memories, called Video RAMs (VRAMs), were developed for simultaneously displaying the contents of a graphics frame buffer to the screen, while allowing the graphics or image processor to update the frame buffer with new data. Video RAMs contain two Input/Output ports (one for random access and one for serial access) and one address port. These memories are frequently referred to as dual-port memories.
In general, workstation graphics, and in particular multi-media workstation displays, provide a double buffer display capability. Double buffer display was originally devised to provide a seamless change between updated display frames. While one buffer is being displayed, the other buffer can be updated without any unwanted front-of-screen artifacts occurring. When the update of that buffer is completed, and just after the end of the current display frame, the buffer select can be switched, allowing the display of the newly updated buffer in the next frame. The process repeats itself in the next frame where the newly updated buffer is displayed and the other buffer is updated with data for display in a later frame. In this way, double buffer display provides a means whereby the actual update of the display data can be hidden from the viewer, allowing the results of that update to be brought to the display instantly once the update is complete.
This double buffer display capability has particular value in 3D, Scientific Visualization, Computer Animation and Digital Video applications. In 3D and Scientific Visualization applications, an update might take a considerable time. Holding back the display of the new data until its completion provides the viewer with a more acceptable front-of-screen experience. Similarly, in computer animation and digital video applications, it is important that the updates be kept hidden from the viewer until they are complete in order to provide smooth animation and to avoid any breakup in the frames of the displayed sequence.
In advanced workstation graphics, a window displaying a single buffer application and a second window showing a double buffer application may be displayed on the screen simultaneously. This is accomplished by transmitting two types of data for each pixel to the workstation's palette DAC (display digital-to-analog converter): a Window Identifier (WID) and the pixel display data. The WID is a pointer that identifies the window, the application, or the class of pixels to which the pixel belongs. The WID is used by the palette DAC to look up various attributes of that pixel class from a Window Attribute Table (WAT) residing in the palette DAC. The attributes define the format of the pixel data, the presence and number of display layers associated with that pixel data, how that pixel data is to be partitioned between the display layers, the type of processing to be applied to the pixel data of each display layer, and the criteria for determining which layer to display. These attributes of the various pixel classes are loaded into the Widow Attribute Table by the application software running on the workstation.
One of the attributes provided to the Window Attribute Table is used to distinguish between "double buffer" and "single buffer" applications. When the attributes from the WAT (for a given WID) indicate the presence of a double buffer application, the pixel display data having that WID is divided into two sub-pixel fields. These two fields are assigned as Buffer A and Buffer B. A further attribute (Buffer Select) from the WAT indicates which of the two buffers should be processed (according to other attributes) and displayed. By simply changing the Buffer Select attribute in the WAT for a given WID, all double buffer pixels belonging to a double buffer application having that same WID will immediately switch between Buffer A and Buffer B anywhere on the entire display. Alternatively and preferably, the palette DAC device can hold off the switch between Buffer A and Buffer B until the start of the next display frame. Single buffer applications provide only one buffer of data to the palette DAC, and so do not provide a buffer select attribute or, alternatively, have that attribute constantly set to the buffer loaded with single buffer data (for example, Buffer A).
As can be seen, such advanced graphics systems and workstations provide double buffer display capability on a per-window basis. However, the control provided is on a per-pixel basis. This allows applications to be displayed in windows of any arbitrary shape. Through the use of WIDs and the attributes they address in the WAT, double buffer display capability can be applied selectively to any window or set of windows, allowing double buffer applications and single buffer applications to be displayed simultaneously.
Computer software applications that take advantage of the double buffer display capability of advanced computer graphics have traditionally been run on computer workstations. However, an emerging class of applications, such as low-end 3D, digital video, educational and games, are being generated for personal computer (PC) platforms that would be substantially benefitted by a double buffer display capability. Thus, in an attempt to provide double buffer display capabilities on conventional PCs, the prior art has provided a multitude of techniques at a cost that is acceptable for the PC market. Unfortunately, these attempts have resulted in double buffer display systems with substantially reduced functionality and less acceptable front-of-screen experience from that seen on workstation platforms.
One technique for implementing double buffer display on a PC would be to duplicate the Window Identifier/Window Attribute method used in workstation graphics systems. However, PC graphics systems, operating systems, and graphic user interfaces almost universally do not provide for the use of WIDs or for selective attribute control of the processing of the pixel data. Therefore, PC hardware and GUI/Operating System software would need to be redesigned, including providing additional frame buffer memory to store the additional WIDs and attribute data, additional pins at the input of the palette DAC device, and additional logic and software to handle the WID/WAT mechanism. While it may be possible to redesign PCs to utilize WIDs and attribute data to enhance PC graphics, the additional high-speed, high-density memory and the substantial increase in complexity of the hardware and software that is required would make such a graphics system prohibitively expensive for the low-cost PC market.
Consequently, various known techniques of providing double buffer capabilities for PC graphics have been developed within the constraints of current PC graphics architectures, without incurring the substantial increased cost associated with providing additional attribute registers and attribute handling circuitry. These methods have several drawbacks, however.
In one technique, a single buffer select register in the Palette DAC is written by a double buffer application being displayed. This register is loaded with a double buffer select signal that indicates which of the two buffers is to be displayed during the current display frame. If only single buffer applications are displayed, then the buffer select register is loaded (or preset) to select a first buffer for every display frame. If a double buffer application is being displayed at the same time as one or more single buffer applications, the buffer select register is alternately loaded to select between the first and a second frame buffer every given number of display frames.
While this enables double buffer display, it introduces severe limitations on the PC graphics system because it is necessary for the entire screen to act as a double buffer display when any double buffer application is to be displayed within a given frame. In other words, it is impossible to constrain double buffer displays to a specific window on a screen. This creates a necessity for duplicating data from any single buffer applications in both buffers to prevent blanking of the single buffer display data when the second buffer is selected. Therefore, when an application directs that the display pixel data is to be displayed as a double buffer display, half of the data transferred from the system's VRAM to the palette DAC for each pixel is dedicated to Buffer A, while the other half is dedicated to Buffer B. For example, the application's pixel data may be handled by the graphics system as 32 bit-per-pixel data, but, when the pixel data reaches the palette DAC, it is split into two 16 bit-sub-pixel fields with the lower 16 bits being assigned as Buffer A and the upper 16 bits being assigned as Buffer B. The palette DAC is then programmed (via the select signal) to select either Buffer A or Buffer B for an entire given display frame. When one or more single buffer applications are displayed at the same time as the double buffer application, the display data for the single buffer applications must be duplicated in both halves of the pixel data (i.e. in both buffers). Otherwise, the display of the single buffer application would disappear from the screen during the frames in which the non-loaded buffer is selected. This duplication of pixel data has the potential effect of halving the performance of all single buffer applications, including the window management functions of any graphical user interface. Any such reduction in performance is at best annoying and at worst may prove to be unacceptable to the user.
Another technique provides two physically separate frame buffers for Buffer A and Buffer B that are multiplexed into the palette DAC device. This technique, without double buffer capability, is simpler to implement since the palette DAC device is a standard palette DAC programmed to process pixel data in the format associated with a single buffer. In this technique, the double buffer display is provided by switching between one physical frame buffer and the other by enabling or selecting one buffer, while disabling or deselecting the other. Just as with the first technique, all single buffer applications require the duplication of their display data in both of the physically separate frame buffers so that they do not disappear from the screen when the double buffer is switched. This technique also exhibits the potentially unacceptable effect of halving the performance of all single buffer applications.
Still another technique includes the buffer select signal within the pixel display data of each pixel. Each pixel has two sub-pixel fields (Buffer A data and Buffer B data) and a buffer select bit. When the palette DAC converts a pixel, it accesses the sub-pixel field indicated by the select bit to retrieve the display pixel data. If the pixel is a single buffer display, the select bit is always set to the same sub-pixel field (Buffer A), so that only one buffer for that pixel needs to be loaded in this technique. If a double buffer application is being displayed at the pixel, the select bit for every double buffer pixel must be rewritten every new data frame to alternate the data displayed between the first sub-pixel field and the second sub-pixel field. It can be seen that this technique consumes a substantial amount of bandwidth because every double buffer pixel must be written at every new data frame to switch the select bit, after the pixel data for the new frame has been changed. This continuous rewriting of the frame buffers has a substantial effect on the performance of the graphics systems's display of both the single and double buffer applications. In addition, because a significant amount of time is required, every pixel must be rewritten to change all the double buffer select bits, therefore, it is difficult to synchronize the frame change to the start of the next display frame.
It is readily apparent from the aforementioned problems that there is a need in the field of computer graphics for a double buffer display capability in PC graphic systems that does not degrade the performance of the display when single buffer applications are displayed simultaneously with double buffer applications. Moreover, it would be desirable for such a capability to be easily incorporated into current PC graphics architectures without requiring the addition of prohibitively expensive memory and a significant redesign of system architecture.